<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>字符串</title>
</head>
<body>
<table id="tbl"></table>
<script type="text/javascript">
    var users = [
        {name: "张三", age: 23, sex: '男'},
        {name: "老王", age: 60, sex: '男'},
        {name: "桂香", age: 19, sex: '女'},
        {name: "魏红", age: 33, sex: '女'},
        {name: "二狗", age: 5, sex: '男'},
    ];
    var tbl=document.getElementById('tbl');
    <!--表头-->
    var str=`
    <tr>
    <th>姓名</th>
    <th>年龄</th>
    <th>性别</th>
    <th>生肖</th>
    </tr>
    `;

    var shengxiao=["狗", "鸡", "猴", "羊", "马", "蛇", "龙", "兔", "虎", "牛", "鼠", "猪"];
    for(var i=0;i<users.length;i++){
        str+=`
    <tr>
    <th>${users[i].name}</th>
    <th>${users[i].age}</th>
    <th>${users[i].sex}</th>
    <th>${shengxiao[users[i].age%12]}</th>
    </tr>
    `;
    }
    tbl.innerHTML=str;

    var sz=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖" ];
    var szs="123344455";
    for(i in szs){
        console.log(sz[szs[i]]);
    }

    Date.prototype.toString=function(){
        return this.getFullYear()+"-"+(this.getMonth()+1)+"-"+this.getDate()+"-"+this.getHours()+":"+this.getMinutes()+":"+this.getSeconds();

    }
    setInterval(function(){
        document.title=(new Date()).toString();
    },1000)

</script>
</body>
</html>